package javawdw.security.dao;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataRetrievalFailureException;

public interface CommonDao<E> {
	public E saveOrUpdate(E instance) throws DataAccessException,
			IllegalArgumentException;

	public E delete(String id) throws DataAccessException,
			DataRetrievalFailureException, IllegalArgumentException;

	public E findFirstByProperty(String name, Object value)
			throws DataAccessException, DataRetrievalFailureException,
			IllegalArgumentException;

	public List<E> find(Map<String, Object> properties)
			throws DataAccessException, DataRetrievalFailureException,
			IllegalArgumentException;
}